<script setup>
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

const closeWindow = () => {
  window.electron.ipcRenderer.send('window/main/close');

}

const miniSize = () => {
  window.electron.ipcRenderer.send('window/main/miniSize');
}
</script>

<template>
  <div class="titleBar enable_drag">
    <el-row>
      <el-col :span="4"></el-col>
      <el-col :span="16"></el-col>
      <el-col :span="4" style="display: flex;justify-content: flex-end">
        <el-button-group class="disable_drag">
          <el-button icon="SemiSelect" @click="miniSize"></el-button>
          <el-button icon="CloseBold" @click="closeWindow"></el-button>
        </el-button-group>
      </el-col>
    </el-row>

  </div>
  <el-config-provider :locale="zhCn">
    <router-view/>
  </el-config-provider>
</template>

<style scoped>

</style>

<style>
.enable_drag {
  app-region: drag;
}

.disable_drag {
  app-region: none;
}
</style>
